package com.itheima.springbootwebtest.mapper;

import com.itheima.springbootwebtest.OperationTypeEnum.OperType;
import com.itheima.springbootwebtest.annotation.AutoLogAnnotation;
import com.itheima.springbootwebtest.pojo.WareHouse;
import com.itheima.springbootwebtest.pojo.WareHouseVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * TODO
 *
 * @Author mr.luo
 * @Date 13 4月 2025 16:25
 */
@Mapper
public interface WareHouseMapper {
//    @Select("select * from warehouse")
    @AutoLogAnnotation(value = OperType.Select)
    List<WareHouse> select(WareHouse warehouseName);

    @AutoLogAnnotation(value = OperType.Select)
    @Select("select * from warehouse ")
    List<WareHouse> selectAll();

    @Update("update warehouse set stock = #{balance} where warehouse_name = #{warehouseName}")
    void update(WareHouseVO wareHouseVO);

//    @AutoLogAnnotation(value = OperType.Update)
//    void update(List<WareHouseVO> list1);
}
